package com.huqing.icu.rentuser.controller;

import com.huqing.icu.base.BaseController;
import com.huqing.icu.rentuser.service.IUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 用户接口
 * @Author huqing
 * @Date 2025/1/22 9:58
 **/
@RestController
@RequestMapping("/api/user")
@Tag(name = "用户接口")
public class UserController extends BaseController {

    @Autowired
    private IUserService iUserService;

    @Operation(summary = "查询用户信息")
    @PostMapping(value = "/query_user_info", produces = "application/json")
    public String queryUserInfo(HttpServletRequest request) {
        //Long userId = checkAndGetUserId(request);
        Long userId = 9600L;
        return jsonSuccessForNull(iUserService.getByUserId(userId));
    }
}
